import request from '@/utils/request'


export function addCourseInfo(courseInfo) {
    return request({
      url: `/eduservice/course/addCourseInfo`,
      method: 'post',
      data:courseInfo
    })
}

export function updateCourseInfo(id,courseInfo) {
    return request({
      url: `/eduservice/course/updateCourseInfo/${id}`,
      method: 'put',
      data:courseInfo
    })
}

export function getCourseInfo(id) {
    return request({
      url: `/eduservice/course/getCourseInfo/${id}`,
      method: 'get'
    })
}

export function getPublishInfo(id) {
    return request({
      url: `/eduservice/course/getPublishInfo/${id}`,
      method: 'get'
    })
}

export function publishCourse(id) {
    return request({
      url: `/eduservice/course/publishCourse/${id}`,
      method: 'put'
    })
}

export function getCourseListByPage(page,limit,educCourseQuery) {
    return request({
      url: `/eduservice/course/getCourseListByPage/${page}/${limit}`,
      method: 'post',
      data:educCourseQuery
    })
}

export function deleteCourse(id) {
    return request({
      url: `/eduservice/course/deleteCourse/${id}`,
      method: 'delete'
    })
}




